//
// Created by Jisam on 2024/7/27 20:10.
// solve A - Glutton Takahashi
#include <bits/stdc++.h>

#define PSI pair<string,int>
#define PII pair<int,int>
#define PDI pair<double,int>
#define PDD pair<double,double>
#define VVI vector<vector<int>>
#define VI vector<int>
#define VS vector<string>

#define PQLI priority_queue<int, vector<int>, less<int>>
#define PQGI priority_queue<int, vector<int>, greater<int>>
#define i64 long long

using namespace std;

const int N = 1e5 + 5;
i64 ans;

void solve() {
    int n;
    cin >> n;
    vector<string> strs(n);
    for(int i = 0 ; i < n ; i ++){
        cin >> strs[i];
    }
    int sweet = 0;
    int i;
    for(i = 0 ; i < n ; i ++){
        if(sweet == 2) break;
        if(strs[i] == "sweet"){
            sweet ++;
        }
        if(strs[i] == "salty"){
            sweet = 0;
        }
    }
    if(sweet == 2 && i != n) cout << "No";
    else { cout << "Yes";}
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int T = 1;
//    cin >> T;
    while (T--) solve();
//    cout << "\n"[];
    return 0;
}